
 
 F u n c t i o n :   a l e r t ( s t r i n g O r E l e m e n t N o d e ,   b o o l D o N o t R e p e a t ) 
 
 
 
 D e s c r i p t i o n :   F i r e s   a   s y s t e m - w i d e   a l e r t   f o r   s c r e e n   r e a d e r   u s e r s   u s i n g   a   s t r i n g   m e s s a g e   o r   t h e   t e x t u a l   c o n t e n t s   o f   a   D O M   e l e m e n t . 
 
 
 
 R e t u r n s :   S t r i n g ,   d o m E l e m e n t ,   o r   $ A   o b j e c t   i f   c h a i n e d . 
 
 
 
 N o t e :   D e s i g n e d   t o   f u n c t i o n   a u t o m a t i c a l l y   w i t h i n   s c r e e n   r e a d e r s   t h a t   p r o p e r l y   s u p p o r t   A R I A   l i v e   r e g i o n s .   T h e   a l e r t   m e t h o d   i s   a l s o   p r o t o t y p e d   t o   t h e   S t r i n g   o b j e c t   f o r   a l t e r n a t i v e   u s a g e .   M u s t   n o t   b e   u s e d   f o r   n o n - c r i t i c a l   s t a t u s   a n n o u n c e m e n t s . 
 
 
 
 E x a m p l e : 
 
 
 
 / /   B a s i c   a l e r t   o f   t h e   t e x t u a l   c o n t e n t   w i t h i n   a   D O M   e l e m e n t . 
 
 $ A . a l e r t ( s e s s i o n T i m e o u t D i a l o g ) ; 
 
 
 
 / /   F i r e   a l e r t   w h i l e   s u p p r e s s i n g   r e p e a t   t e x t 
 
 v a r   s t r i n g V a r i a b l e   =   $ A . a l e r t ( " Y o u   h a v e   3 0   s e c o n d s   t o   r e s p o n d . " ,   t r u e ) ; 
 
 
 
 / /   U s i n g   s t r i n g s 
 
 
 
 v a r   s t r i n g V a r i a b l e   =   " P r o c e s s i n g   y o u r   p a y m e n t ,   p l e a s e   w a i t . " . a l e r t ( ) ; 
 
 
 
 / /   F i r e   a l e r t   w h i l e   s u p p r e s s i n g   r e p e a t   t e x t 
 
 s t r i n g V a r i a b l e . a l e r t ( t r u e ) ; 
 
 
 
 / /   M a n u a l l y   c l e a r   t h e   i n t e r n a l   m e s s a g e   q u e u e 
 
 
 
 $ A . a l e r t . c l e a r ( ) ; 
 
 
 
 / /   O r 
 
 
 
 s t r i n g V a r i a b l e . a l e r t . c l e a r ( ) ; 
 
 